#include "ball.h"
#include "loadModel.h"
#include <GL/glut.h>

Ball::Ball()
{
	//Vertices, colors and bound
	load("obj/ball.ply", 0);
}

void Ball::increaseSpeed()
{
	//SpeedX inside limits
	/*if (speedX < 1.0f && speedX > -1.0f)
		//Increase speed (decrease if negative)
		speedX += 0.05f *(speedX > 0 ? 1 : -1);

	//SpeedY inside limits
	if (speedZ < 1.0f && speedZ > -1.0f)
		//Increase speed (decrease if negative)
		speedZ += 0.05f *(speedZ > 0 ? 1 : -1);*/

	if (speed < 0.8f)
		speed += 0.05f;
}

void Ball::resetSpeed()
{
	//Ball's default speed
	speed = 0.4f;
}
